<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>break语句</title>
    <script>
        let count = 10;
        let num = 0;

        for (let i = 1; i < count; i++) {
            if (i % 5 == 0) {
                break
            }
            num++;
        }
        console.log("num: " + num);//4


    </script>
</head>
<body>
break语句
</body>
</html>